#!/bin/bash

cd /tmp

#touch `basename $0`
while true
 do
	N=`ps -eaf |grep upsi.sh |grep -v grep |awk '{print $2}' |wc -l`
	
	if [ $N -gt "2" ];then
		echo "Process running: $N.."
		exit 0
 	else
		touch	/tmp/upsi.log
		wget "http://panther7.adm.intranet/importer/index.cfm?false"
		rm index.cfm\?debug*
		rm index.cfm\?false*
	fi
done
